using UnityEngine;
using LP;

public class GameSettingMgr : AbsMgr
{
    public override void OnInit()
    {
        base.OnInit();
        Application.targetFrameRate = 60;
        Application.runInBackground = true;
    }

    public override void OnDestroy()
    {
        base.OnDestroy();
    }

    public override void OnUpdate(float delta)
    {
        base.OnUpdate(delta);
        if (Application.platform == RuntimePlatform.Android)
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                //返回上级界面
                // LPGL.WindowMgrIns.Back();
            }

            if (Input.GetKeyDown(KeyCode.Home))
            {
                //退出游戏
                // Application.Quit();
            }
        }
    }

    public void PauseGame()
    {
        Debug.Log("PauseGame");
        Time.timeScale = 0f;
    }

    public void ResumeGame()
    {
        Debug.Log("ResumeGame");
        Time.timeScale = 1f;
    }
}